@import "./base.less";

.@{css-prefix}.switch {
  cursor: pointer;
  .user-select(none);
  font-size: @base-font-size;
  outline: 0;
  position: relative;
  height: @base-font-size + .5rem;
  width: auto;
  display: inline-block;
  padding-left: 4em;
  vertical-align: middle;

  .disabled;

  &.checked {
    &:before {
      background: @primary-color;
    }
    &:after {
      box-shadow: none;
      left: 2.15em;
    }
  }

  &:before {
    position: absolute;
    top: 0;
    left: 0;
    width: 3.5em;
    height: 1.5em;
    content: '';
    background: #E0E1E2;
    border-radius: @border-radius;
    z-index: 1;
  }
  &:after {
    position: absolute;
    z-index: 2;
    top: .15em;
    left: .15em;
    width: 1.2em;
    height: 1.2em;
    content: '';
    text-align: center;
    border-radius: @border-radius;
    background: #fff;
    box-shadow: 0px 0px 3px #aaa;
    transition: all 0.36s;
  }
}